package cn.jane.bigevent.anno;

import cn.jane.bigevent.validator.StateValidation;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Documented
@Constraint(validatedBy = StateValidation.class)
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface State {

    String message() default "state参数的值只能是\"已发布\"或者\"草稿\"";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
